/**
 * There are <a href="https://github.com/thinkgem/jeesite">JeeSite</a> code generation
 */
package com.boxin.ims.modules.wechat.dao;

import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Component;

import com.thinkgem.jeesite.common.persistence.BaseDao;
import com.thinkgem.jeesite.common.persistence.BaseDaoImpl;
import com.boxin.ims.modules.wechat.entity.MobileMessageRecorder;

/**
 * 手机短信记录DAO接口
 * @author zhangshanshan
 * @version 2015-08-08
 */
public interface MobileMessageRecorderDao extends MobileMessageRecorderDaoCustom, CrudRepository<MobileMessageRecorder, Long> {

	@Modifying
	@Query("delete from  MobileMessageRecorder   where id = ?1")
	public int deleteById(Long id);
	
	
	
	@Query(" from  MobileMessageRecorder  where  mobile = ?1  and randNum = ?2 ")
	public MobileMessageRecorder getByMobileAndRandNum(String mobile,String randNum);
}

/**
 * DAO自定义接口
 * @author zhangshanshan
 */
interface MobileMessageRecorderDaoCustom extends BaseDao<MobileMessageRecorder> {

}

/**
 * DAO自定义接口实现
 * @author zhangshanshan
 */
@Component
class MobileMessageRecorderDaoImpl extends BaseDaoImpl<MobileMessageRecorder> implements MobileMessageRecorderDaoCustom {

}
